//书写方式上
const state = {
	count: 0,
	items: []
}
const mutations = {
	addVal(state, i) {
		state.items[i].num++
	},
}
const actions = {
	getVal({
		commit
	}, i) {
		commit('addVal', i)
	},
}

export default {
	namespaced: true, //使用命名空间
	state,
	mutations,
	actions
}
